-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore nextstrain.org PRs #1565
Conversation
Uh, yes they are? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the re-enabling here.
Not the fault of this PR, but I'm still not thrilled that we're passing decently powerful credentials to some random third-party code:
auspice/.github/workflows/make_prs_for_other_repos.yaml
Lines 29 to 31 in 5ba0b26
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.NEXTSTRAIN_BOT_PAT }} |
Good timing! As per #1564 I'd recommend making this a workflow dispatch rather than automatically making a (nextstrain.org) PR for each auspice PR -- in practice this resulted in too many unnecessary PRs which became confusing. |
Follow-up to db85805. Heroku is building review apps for nextstrain.org now.
5ba0b26
to
83b46b8
Compare
@tsibley oh you're right, they are working on nextstrain.org PRs. I updated the commit/PR descriptions to reflect that. |
8516b2b
to
af56b03
Compare
From the message of af56b03:
To avoid both of these issues, can we instead make the workflow accept a PR number? e.g.:
The workflow would then have the PR number to use and be able to turn |
Having "directories" for automatically created branches can help make the branch list more navigable for some users.
af56b03
to
243046d
Compare
243046d
to
9c9bfd3
Compare
@victorlin is your intention to run these on the head commit of the branch (which is what I did when I set up the action) or the merge commit of the branch into master (which is |
@jameshadfield oops, I got your original intention backwards in my commit message. You're right, In the currently pushed implementation, I intend to run these on the head commit of the branch (not merge), which is simply However, @tsibley noted from my (incorrect) commit description that it's still possible to get the merge ref from the PR number. This would change behavior as you mention:
I'd actually be in favor of surfacing these failures, since they are bound to come up once actually merged, and better to catch them sooner than later. |
Fair enough. Perhaps add a message to this effect in the PR body, as this will catch someone out!
I guess this makes some sense, but I find it super confusing to have GITHUB_SHA refer to different things depending on the trigger. I didn't actually know a branch-merge-commit (which isn't found anywhere in your local git tree) even exists until I wrote the original action here. |
9c9bfd3
to
26c678f
Compare
6e64179
to
18199bc
Compare
18199bc
to
27b49a7
Compare
27b49a7
to
95d921b
Compare
Updated to only allow branches with PRs, for simplicity and parity with previous behavior. |
This allows us to only create review PRs in the downstream repo when necessary, reducing the amount of excessive automated PRs. Two notes: 1. With the manual trigger, there is an option to allow this workflow to run on tags and branches without PRs. To keep the logic simpler and maintain previous behavior, I've chosen to not allow those scenarios. 2. The GITHUB_SHA of workflow_dispatch is no longer the GitHub-managed PR merge ref, so it can be used here to retain original behavior. Also, do all the nextstrain.org work under a separate directory DESTINATION_REPO_DIR to make steps a bit more distinct.
95d921b
to
328ae93
Compare
328ae93
to
d5637ee
Compare
This is ready for review again. I went down a deep rabbit hole on the last task in the PR tasklist - figuring out why runs are taking so long [1] [2], and trying alternatives unsuccessfully. 15 minute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @victorlin -- thanks for persevering 😄
Previously, Auspice was installed from the source branch HEAD directly. This can fail to catch issues if there are notable changes in the PR target branch unincorporated in the source branch. Creating the nextstrain.org PR from the auto-merged ref should surface any merge-related issues sooner than later.
39fea44
to
bca8971
Compare
Description of proposed changes
Follow-up to db85805.
Heroku is building review apps for nextstrain.org now.
Related issue(s)
Testing
gh workflow run "Make PRs for Nextstrain projects which depend on Auspice" --repo nextstrain/auspice --ref victorlin/restore-nextstrain.org-prs
succeeds (link)Figure out why runs are taking so long (>15m)not worth it